home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / SETUP / US / CBUILDER / DATA.Z / AVICAP.H < prev    next >
C/C++ Source or Header  |  1997-02-13  |  30KB  |  571 lines

  1. /****************************************************************************
  2.  *
  3.  *   avicap.h
  4.  *
  5.  *   Main include file.
  6.  *
  7.  *   Microsoft Video for Windows Sample Capture Class
  8.  *
  9.  *    You have a royalty-free right to use, modify, reproduce and
  10.  *    distribute the Sample Files (and/or any modified version) in
  11.  *    any way you find useful, provided that you agree that
  12.  *    Microsoft has no warranty obligations or liability for any
  13.  *    Sample Application Files which are modified.
  14.  *
  15.  ***************************************************************************/
  16.  
  17. /*
  18.  *      C/C++ Run Time Library - Version 8.0
  19.  *
  20.  *      Copyright (c) 1994, 1997 by Borland International
  21.  *      All Rights Reserved.
  22.  *
  23.  */
  24.  
  25. #ifndef _INC_AVICAP
  26. #define _INC_AVICAP
  27. #define __AVICAP_H
  28. #pragma option -b
  29.  
  30. #if !defined(RC_INVOKED) && !defined(VFWAPI)
  31. #ifdef _WIN32
  32.     #define VFWAPI  __stdcall
  33.     #define VFWAPIV __stdcall
  34.     #define _LOADDS
  35.     #pragma message("AVICAP.H: Defining VFWAPIV to be __stdcall...................")
  36. #else
  37.     #define VFWAPI  FAR PASCAL
  38.     #define VFWAPIV FAR CDECL
  39. #endif
  40. #endif
  41.  
  42. #ifdef __cplusplus
  43. #define AVICapSM ::SendMessage  /* SendMessage in C++*/
  44. #else
  45. #define AVICapSM SendMessage    /* SendMessage in C */
  46. #endif  /* __cplusplus */
  47.  
  48. #ifdef __cplusplus
  49. extern "C" {            /* Assume C declarations for C++ */
  50. #endif  /* __cplusplus */
  51.  
  52. #ifdef __BORLANDC__
  53. #pragma option -b.
  54.   #include <pshpack1.h>
  55. #pragma option -b
  56. #endif
  57.  
  58. #ifndef RC_INVOKED
  59.  
  60. // ------------------------------------------------------------------
  61. //  Window Messages  WM_CAP... which can be sent to an AVICAP window
  62. // ------------------------------------------------------------------
  63.  
  64.  
  65.  
  66. // UNICODE
  67. //
  68. // The Win32 version of AVICAP supports UNICODE applications:
  69. // for each API or message that takes a char or string parameter, there are
  70. // two versions, ApiNameA and ApiNameW. The default name ApiName is #defined
  71. // to one or other depending on whether UNICODE is defined. Apps can call
  72. // the A and W apis directly, and mix them.
  73. //
  74. // The 32-bit AVICAP uses unicode exclusively internally. ApiNameA() will be
  75. // implemented as a call to ApiNameW() together with translation of strings.
  76.  
  77.  
  78.  
  79.  
  80. // Defines start of the message range
  81. #define WM_CAP_START                    WM_USER
  82.  
  83. // start of unicode messages
  84. #define WM_CAP_UNICODE_START            WM_USER+100
  85.  
  86. #define WM_CAP_GET_CAPSTREAMPTR         (WM_CAP_START+  1)
  87.  
  88. #ifdef _WIN32
  89. #define WM_CAP_SET_CALLBACK_ERRORW     (WM_CAP_UNICODE_START+  2)
  90. #define WM_CAP_SET_CALLBACK_STATUSW    (WM_CAP_UNICODE_START+  3)
  91. #define WM_CAP_SET_CALLBACK_ERRORA     (WM_CAP_START+  2)
  92. #define WM_CAP_SET_CALLBACK_STATUSA    (WM_CAP_START+  3)
  93. #ifdef UNICODE
  94. #define WM_CAP_SET_CALLBACK_ERROR       WM_CAP_SET_CALLBACK_ERRORW
  95. #define WM_CAP_SET_CALLBACK_STATUS      WM_CAP_SET_CALLBACK_STATUSW
  96. #else
  97. #define WM_CAP_SET_CALLBACK_ERROR       WM_CAP_SET_CALLBACK_ERRORA
  98. #define WM_CAP_SET_CALLBACK_STATUS      WM_CAP_SET_CALLBACK_STATUSA
  99. #endif
  100. #else
  101. #define WM_CAP_SET_CALLBACK_ERROR       (WM_CAP_START+  2)
  102. #define WM_CAP_SET_CALLBACK_STATUS      (WM_CAP_START+  3)
  103. #endif
  104.  
  105.  
  106. #define WM_CAP_SET_CALLBACK_YIELD       (WM_CAP_START+  4)
  107. #define WM_CAP_SET_CALLBACK_FRAME       (WM_CAP_START+  5)
  108. #define WM_CAP_SET_CALLBACK_VIDEOSTREAM (WM_CAP_START+  6)
  109. #define WM_CAP_SET_CALLBACK_WAVESTREAM  (WM_CAP_START+  7)
  110. #define WM_CAP_GET_USER_DATA            (WM_CAP_START+  8)
  111. #define WM_CAP_SET_USER_DATA            (WM_CAP_START+  9)
  112.  
  113. #define WM_CAP_DRIVER_CONNECT           (WM_CAP_START+  10)
  114. #define WM_CAP_DRIVER_DISCONNECT        (WM_CAP_START+  11)
  115.  
  116. #ifdef _WIN32
  117. #define WM_CAP_DRIVER_GET_NAMEA        (WM_CAP_START+  12)
  118. #define WM_CAP_DRIVER_GET_VERSIONA     (WM_CAP_START+  13)
  119. #define WM_CAP_DRIVER_GET_NAMEW        (WM_CAP_UNICODE_START+  12)
  120. #define WM_CAP_DRIVER_GET_VERSIONW     (WM_CAP_UNICODE_START+  13)
  121. #ifdef UNICODE
  122. #define WM_CAP_DRIVER_GET_NAME          WM_CAP_DRIVER_GET_NAMEW
  123. #define WM_CAP_DRIVER_GET_VERSION       WM_CAP_DRIVER_GET_VERSIONW
  124. #else
  125. #define WM_CAP_DRIVER_GET_NAME          WM_CAP_DRIVER_GET_NAMEA
  126. #define WM_CAP_DRIVER_GET_VERSION       WM_CAP_DRIVER_GET_VERSIONA
  127. #endif
  128. #else
  129. #define WM_CAP_DRIVER_GET_NAME          (WM_CAP_START+  12)
  130. #define WM_CAP_DRIVER_GET_VERSION       (WM_CAP_START+  13)
  131. #endif
  132.  
  133. #define WM_CAP_DRIVER_GET_CAPS          (WM_CAP_START+  14)
  134.  
  135. #ifdef _WIN32
  136. #define WM_CAP_FILE_SET_CAPTURE_FILEA  (WM_CAP_START+  20)
  137. #define WM_CAP_FILE_GET_CAPTURE_FILEA  (WM_CAP_START+  21)
  138. #define WM_CAP_FILE_SAVEASA            (WM_CAP_START+  23)
  139. #define WM_CAP_FILE_SAVEDIBA           (WM_CAP_START+  25)
  140. #define WM_CAP_FILE_SET_CAPTURE_FILEW  (WM_CAP_UNICODE_START+  20)
  141. #define WM_CAP_FILE_GET_CAPTURE_FILEW  (WM_CAP_UNICODE_START+  21)
  142. #define WM_CAP_FILE_SAVEASW            (WM_CAP_UNICODE_START+  23)
  143. #define WM_CAP_FILE_SAVEDIBW           (WM_CAP_UNICODE_START+  25)
  144. #ifdef UNICODE
  145. #define WM_CAP_FILE_SET_CAPTURE_FILE    WM_CAP_FILE_SET_CAPTURE_FILEW
  146. #define WM_CAP_FILE_GET_CAPTURE_FILE    WM_CAP_FILE_GET_CAPTURE_FILEW
  147. #define WM_CAP_FILE_SAVEAS              WM_CAP_FILE_SAVEASW
  148. #define WM_CAP_FILE_SAVEDIB             WM_CAP_FILE_SAVEDIBW
  149. #else
  150. #define WM_CAP_FILE_SET_CAPTURE_FILE    WM_CAP_FILE_SET_CAPTURE_FILEA
  151. #define WM_CAP_FILE_GET_CAPTURE_FILE    WM_CAP_FILE_GET_CAPTURE_FILEA
  152. #define WM_CAP_FILE_SAVEAS              WM_CAP_FILE_SAVEASA
  153. #define WM_CAP_FILE_SAVEDIB             WM_CAP_FILE_SAVEDIBA
  154. #endif
  155. #else
  156. #define WM_CAP_FILE_SET_CAPTURE_FILE    (WM_CAP_START+  20)
  157. #define WM_CAP_FILE_GET_CAPTURE_FILE    (WM_CAP_START+  21)
  158. #define WM_CAP_FILE_SAVEAS              (WM_CAP_START+  23)
  159. #define WM_CAP_FILE_SAVEDIB             (WM_CAP_START+  25)
  160. #endif
  161.  
  162. // out of order to save on ifdefs
  163. #define WM_CAP_FILE_ALLOCATE            (WM_CAP_START+  22)
  164. #define WM_CAP_FILE_SET_INFOCHUNK       (WM_CAP_START+  24)
  165.  
  166. #define WM_CAP_EDIT_COPY                (WM_CAP_START+  30)
  167.  
  168. #define WM_CAP_SET_AUDIOFORMAT          (WM_CAP_START+  35)
  169. #define WM_CAP_GET_AUDIOFORMAT          (WM_CAP_START+  36)
  170.  
  171. #define WM_CAP_DLG_VIDEOFORMAT          (WM_CAP_START+  41)
  172. #define WM_CAP_DLG_VIDEOSOURCE          (WM_CAP_START+  42)
  173. #define WM_CAP_DLG_VIDEODISPLAY         (WM_CAP_START+  43)
  174. #define WM_CAP_GET_VIDEOFORMAT          (WM_CAP_START+  44)
  175. #define WM_CAP_SET_VIDEOFORMAT          (WM_CAP_START+  45)
  176. #define WM_CAP_DLG_VIDEOCOMPRESSION     (WM_CAP_START+  46)
  177.  
  178. #define WM_CAP_SET_PREVIEW              (WM_CAP_START+  50)
  179. #define WM_CAP_SET_OVERLAY              (WM_CAP_START+  51)
  180. #define WM_CAP_SET_PREVIEWRATE          (WM_CAP_START+  52)
  181. #define WM_CAP_SET_SCALE                (WM_CAP_START+  53)
  182. #define WM_CAP_GET_STATUS               (WM_CAP_START+  54)
  183. #define WM_CAP_SET_SCROLL               (WM_CAP_START+  55)
  184.  
  185. #define WM_CAP_GRAB_FRAME               (WM_CAP_START+  60)
  186. #define WM_CAP_GRAB_FRAME_NOSTOP        (WM_CAP_START+  61)
  187.  
  188. #define WM_CAP_SEQUENCE                 (WM_CAP_START+  62)
  189. #define WM_CAP_SEQUENCE_NOFILE          (WM_CAP_START+  63)
  190. #define WM_CAP_SET_SEQUENCE_SETUP       (WM_CAP_START+  64)
  191. #define WM_CAP_GET_SEQUENCE_SETUP       (WM_CAP_START+  65)
  192.  
  193. #ifdef _WIN32
  194. #define WM_CAP_SET_MCI_DEVICEA         (WM_CAP_START+  66)
  195. #define WM_CAP_GET_MCI_DEVICEA         (WM_CAP_START+  67)
  196. #define WM_CAP_SET_MCI_DEVICEW         (WM_CAP_UNICODE_START+  66)
  197. #define WM_CAP_GET_MCI_DEVICEW         (WM_CAP_UNICODE_START+  67)
  198. #ifdef UNICODE
  199. #define WM_CAP_SET_MCI_DEVICE           WM_CAP_SET_MCI_DEVICEW
  200. #define WM_CAP_GET_MCI_DEVICE           WM_CAP_GET_MCI_DEVICEW
  201. #else
  202. #define WM_CAP_SET_MCI_DEVICE           WM_CAP_SET_MCI_DEVICEA
  203. #define WM_CAP_GET_MCI_DEVICE           WM_CAP_GET_MCI_DEVICEA
  204. #endif
  205. #else
  206. #define WM_CAP_SET_MCI_DEVICE           (WM_CAP_START+  66)
  207. #define WM_CAP_GET_MCI_DEVICE           (WM_CAP_START+  67)
  208. #endif
  209.  
  210.  
  211.  
  212. #define WM_CAP_STOP                     (WM_CAP_START+  68)
  213. #define WM_CAP_ABORT                    (WM_CAP_START+  69)
  214.  
  215. #define WM_CAP_SINGLE_FRAME_OPEN        (WM_CAP_START+  70)
  216. #define WM_CAP_SINGLE